





<div class="x-body">
        <form class="layui-form form_single" id="form" action="{:url('')}" method="post">

            <div class="layui-form-item" >
                <label class="layui-form-label">充值类型类型</label>
                <div class="layui-input-block">
                    <input type="radio" lay-filter="test" name="type" value="1" title="总包"    checked >
                    <input type="radio" lay-filter="test" name="type" value="3" title="理财包"    >
                    <input type="radio" lay-filter="test" name="type" value="4" title="币币"    >
                    <input type="radio" lay-filter="test" name="type" value="5" title="法币"    >
                    <input type="radio" lay-filter="test" name="type" value="6" title="商铺余额"    >
                </div>
            </div>
            <div class="layui-form-item" id="wallet" style="display: none">
                <label class="layui-form-label">
                    <span class="x-red">*</span>钱包类型
                </label>
                <div class="layui-input-block">
                    <select name="form_wallet_id" class="form-control">
                        {volist name='wallet' id='vo'}
                        <option value="{$vo['id']}">{$vo['name']}</option>
                        {/volist}
                    </select>
                </div>
                <div class="layui-form-mid layui-word-aux">
                    (钱包类型)
                </div>

            </div>

            <div class="layui-form-item" id="shopname" style="display: none">
                <label for="shopname" class="layui-form-label">
                    <span class="x-red">*</span>商铺名
                </label>
                <div class="layui-input-block">
                    <input type="text" id="shopname" name="shopname" required="" lay-verify="required"
                           autocomplete="off"   class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">
                    (商铺名)
                </div>

            </div>

        <div class="layui-form-item" id="user_name">
            <label for="username" class="layui-form-label">
                <span class="x-red">*</span>用户名
            </label>
            <div class="layui-input-block">
                <input type="text" id="username" name="username" required="" lay-verify="required"
                       autocomplete="off"   class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                (用户名)
            </div>
        </div>

        <div class="layui-form-item">
            <label for="L_pass" class="layui-form-label">
                充值金额
            </label>
            <div class="layui-input-block">
                <input type="number" id="L_pass" name="balance"
                       autocomplete="off" class="layui-input"  >
            </div>
            <div class="layui-form-mid layui-word-aux">
                (充值金额)
            </div>
        </div>

            <div class="layui-form-item">
                <label for="remark" class="layui-form-label">
                    充值备注
                </label>
                <div class="layui-input-block">
                    <textarea id="remark" class="layui-textarea" name="remark" maxlength="80" onchange="this.value=this.value.substring(0, 80)" onkeydown="this.value=this.value.substring(0, 80)" onkeyup="this.value=this.value.substring(0, 80)"    rows="3" placeholder="请输入充值备注">{$info['describe']|default=''}</textarea>
                </div>
                <!--<div class="layui-form-mid layui-word-aux">-->
                <!--(文章描述信息/简介)-->
                <!--</div>-->
            </div>








<div class="box-footer">

    {include file="layout/edit_btn_group"/}

</div>

</form>
</div>

<script>

    layui.use('form', function(){
        var form = layui.form;

        //各种基于事件的操作，下面会有进一步介绍
        form.on('radio(test)', function(data){
            if(data.value==5 ){
                $('#wallet').show();
            } else{
                $('#wallet').hide();
            }
            
            form.render();
            console.log(data.value); //被点击的radio的value值
        });
    });


</script>


